From 0d81100af3902f1a80ef93f9756bfc0142d74cb2 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sat, 13 Mar 1999 01:24:10 +0000 Subject: [PATCH] Don't append a * to the pattern to complete if the user entered one herself. This way one can complete *.h and don't get matches on any .help files, for instance. --- ChangeLog | 8 ++++++-- ChangeLog.pre-2-0 | 8 ++++++-- ChangeLog.pre-2-10 | 8 ++++++-- ChangeLog.pre-2-2 | 8 ++++++-- ChangeLog.pre-2-4 | 8 ++++++-- ChangeLog.pre-2-6 | 8 ++++++-- ChangeLog.pre-2-8 | 8 ++++++-- gtk/gtkfilesel.c | 7 ++++++- 8 files changed, 48 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7ac915d952..189e0810ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,9 +5,13 @@ * gtk/gtkfilesel.c: Use g_get_current_dir(). Merge in Win32 version: Use G_DIR_SEPARATOR, g_path_is_absolute, no tilde expansion (based on HAVE_PWD_H), allow for drive letters. UNC - names not handled yet. Also, code from Craig Setera's port to - Win32 that uses cygwin.dll + paths (\\server\share\...) not handled yet. Also, code from Craig + Setera's port to Win32 that uses cygwin.dll + * gtk/gtkfilesel.c: Don't append a * to the pattern to complete if + the user entered one herself. This way one can complete *.h and + don't get matches on any .help files, for instance. + Tue Mar 9 01:01:28 1999 Tim Janik * gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 7ac915d952..189e0810ec 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -5,9 +5,13 @@ * gtk/gtkfilesel.c: Use g_get_current_dir(). Merge in Win32 version: Use G_DIR_SEPARATOR, g_path_is_absolute, no tilde expansion (based on HAVE_PWD_H), allow for drive letters. UNC - names not handled yet. Also, code from Craig Setera's port to - Win32 that uses cygwin.dll + paths (\\server\share\...) not handled yet. Also, code from Craig + Setera's port to Win32 that uses cygwin.dll + * gtk/gtkfilesel.c: Don't append a * to the pattern to complete if + the user entered one herself. This way one can complete *.h and + don't get matches on any .help files, for instance. + Tue Mar 9 01:01:28 1999 Tim Janik * gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 7ac915d952..189e0810ec 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -5,9 +5,13 @@ * gtk/gtkfilesel.c: Use g_get_current_dir(). Merge in Win32 version: Use G_DIR_SEPARATOR, g_path_is_absolute, no tilde expansion (based on HAVE_PWD_H), allow for drive letters. UNC - names not handled yet. Also, code from Craig Setera's port to - Win32 that uses cygwin.dll + paths (\\server\share\...) not handled yet. Also, code from Craig + Setera's port to Win32 that uses cygwin.dll + * gtk/gtkfilesel.c: Don't append a * to the pattern to complete if + the user entered one herself. This way one can complete *.h and + don't get matches on any .help files, for instance. + Tue Mar 9 01:01:28 1999 Tim Janik * gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 7ac915d952..189e0810ec 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -5,9 +5,13 @@ * gtk/gtkfilesel.c: Use g_get_current_dir(). Merge in Win32 version: Use G_DIR_SEPARATOR, g_path_is_absolute, no tilde expansion (based on HAVE_PWD_H), allow for drive letters. UNC - names not handled yet. Also, code from Craig Setera's port to - Win32 that uses cygwin.dll + paths (\\server\share\...) not handled yet. Also, code from Craig + Setera's port to Win32 that uses cygwin.dll + * gtk/gtkfilesel.c: Don't append a * to the pattern to complete if + the user entered one herself. This way one can complete *.h and + don't get matches on any .help files, for instance. + Tue Mar 9 01:01:28 1999 Tim Janik * gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 7ac915d952..189e0810ec 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -5,9 +5,13 @@ * gtk/gtkfilesel.c: Use g_get_current_dir(). Merge in Win32 version: Use G_DIR_SEPARATOR, g_path_is_absolute, no tilde expansion (based on HAVE_PWD_H), allow for drive letters. UNC - names not handled yet. Also, code from Craig Setera's port to - Win32 that uses cygwin.dll + paths (\\server\share\...) not handled yet. Also, code from Craig + Setera's port to Win32 that uses cygwin.dll + * gtk/gtkfilesel.c: Don't append a * to the pattern to complete if + the user entered one herself. This way one can complete *.h and + don't get matches on any .help files, for instance. + Tue Mar 9 01:01:28 1999 Tim Janik * gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 7ac915d952..189e0810ec 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -5,9 +5,13 @@ * gtk/gtkfilesel.c: Use g_get_current_dir(). Merge in Win32 version: Use G_DIR_SEPARATOR, g_path_is_absolute, no tilde expansion (based on HAVE_PWD_H), allow for drive letters. UNC - names not handled yet. Also, code from Craig Setera's port to - Win32 that uses cygwin.dll + paths (\\server\share\...) not handled yet. Also, code from Craig + Setera's port to Win32 that uses cygwin.dll + * gtk/gtkfilesel.c: Don't append a * to the pattern to complete if + the user entered one herself. This way one can complete *.h and + don't get matches on any .help files, for instance. + Tue Mar 9 01:01:28 1999 Tim Janik * gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 7ac915d952..189e0810ec 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -5,9 +5,13 @@ * gtk/gtkfilesel.c: Use g_get_current_dir(). Merge in Win32 version: Use G_DIR_SEPARATOR, g_path_is_absolute, no tilde expansion (based on HAVE_PWD_H), allow for drive letters. UNC - names not handled yet. Also, code from Craig Setera's port to - Win32 that uses cygwin.dll + paths (\\server\share\...) not handled yet. Also, code from Craig + Setera's port to Win32 that uses cygwin.dll + * gtk/gtkfilesel.c: Don't append a * to the pattern to complete if + the user entered one herself. This way one can complete *.h and + don't get matches on any .help files, for instance. + Tue Mar 9 01:01:28 1999 Tim Janik * gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c index 16091ceb54..9b217c65d3 100644 --- a/gtk/gtkfilesel.c +++ b/gtk/gtkfilesel.c @@ -2797,7 +2797,12 @@ attempt_file_completion(CompletionState *cmpl_state) pat_buf = g_new (gchar, len + 2); strcpy(pat_buf, dir->cmpl_text); - strcpy(pat_buf + len, "*"); + /* Don't append a * if the user entered one herself. + * This way one can complete *.h and don't get matches + * on any .help files, for instance. + */ + if (strchr(pat_buf, '*') == NULL) + strcpy(pat_buf + len, "*"); } if(first_slash) -- 2.30.2